package com.lyf.design.learn.designmodel.strategy.sortsample.demo2;

/**
 * @AUTHOR LYF
 * @DATE 2022/6/2
 * @VERSION 1.0
 * @DESC
 */
public class Cat extends Animal{
    int age;

    public Cat(int age) {
        this.age = age;
    }

    public Cat(float weight, int age) {
        super(weight);
        this.age = age;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    void call() {
        System.out.println("cat is calling...");
    }

    @Override
    public String toString() {
        return "Cat{" +
                "weight=" + weight +
                ", age=" + age +
                '}';
    }
}
